﻿using FluentMigrator;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Coevery.Database.Migrations
{
    [Migration(20121121145326)]
    public class _20121121145326_UpdateSaveQueryTable : Migration
    {
        public override void Up()
        {
            string layoutXml = "<XtraSerializer version=\"1.0\" application=\"View\">    <property name=\"#LayoutVersion\" />    <property name=\"NewItemRowText\" />    <property name=\"GroupFooterShowMode\">VisibleIfExpanded</property>    <property name=\"LevelIndent\">-1</property>    <property name=\"PreviewIndent\">-1</property>    <property name=\"PreviewLineCount\">-1</property>    <property name=\"BestFitMaxRowCount\">-1</property>    <property name=\"ScrollStyle\">LiveVertScroll, LiveHorzScroll</property>    <property name=\"FocusRectStyle\">RowFocus</property>    <property name=\"HorzScrollStep\">3</property>    <property name=\"GroupPanelText\" />    <property name=\"ActiveFilterEnabled\">true</property>    <property name=\"ViewCaptionHeight\">-1</property>    <property name=\"ShowButtonMode\">ShowForFocusedCell</property>    <property name=\"Columns\" iskey=\"true\" value=\"6\">      <property name=\"Item6\" isnull=\"true\" iskey=\"true\">        <property name=\"Width\">30</property>        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">0</property>        <property name=\"Name\">colNotificationStatus</property>        <property name=\"ColumnEditName\">RepositoryItemImageComboBox</property>        <property name=\"FieldName\">NotificationStatus</property>      </property> <property name=\"Item1\" isnull=\"true\" iskey=\"true\">        <property name=\"Width\">86</property>        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">1</property>        <property name=\"Name\">colObjectType</property>        <property name=\"ColumnEditName\" />        <property name=\"FieldName\">ObjectType</property>      </property>      <property name=\"Item2\" isnull=\"true\" iskey=\"true\">        <property name=\"Width\">97</property>        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">1</property>        <property name=\"Name\">colSubject</property>        <property name=\"ColumnEditName\" />        <property name=\"FieldName\">Subject</property>      </property>      <property name=\"Item4\" isnull=\"true\" iskey=\"true\">        <property name=\"Width\">80</property>        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">3</property>        <property name=\"Name\">colCreatedOn</property>        <property name=\"ColumnEditName\" />        <property name=\"FieldName\">CreatedOn</property>      </property>      <property name=\"Item5\" isnull=\"true\" iskey=\"true\">        <property name=\"Width\">85</property>        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">4</property>        <property name=\"Name\">colCreatedBy</property>        <property name=\"ColumnEditName\" />        <property name=\"FieldName\">CreatedById</property>      </property>      <property name=\"Item3\" isnull=\"true\" iskey=\"true\">        <property name=\"Width\">500</property>        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">5</property>        <property name=\"Name\">colContent</property>        <property name=\"ColumnEditName\" />        <property name=\"FieldName\">Body</property>      </property>    </property>    <property name=\"ViewCaption\" />    <property name=\"BorderStyle\">Default</property>    <property name=\"SynchronizeClones\">true</property>    <property name=\"DetailTabHeaderLocation\">Top</property>    <property name=\"Name\">gridView1</property>    <property name=\"DetailHeight\">350</property>    <property name=\"PreviewFieldName\" />    <property name=\"ChildGridLevelName\" />    <property name=\"FixedLineWidth\">2</property>    <property name=\"IndicatorWidth\">-1</property>    <property name=\"ColumnPanelRowHeight\">-1</property>    <property name=\"OptionsView\" isnull=\"true\" iskey=\"true\">      <property name=\"ShowFilterPanelMode\">Never</property>      <property name=\"ShowIndicator\">false</property>      <property name=\"ShowGroupPanel\">false</property>      <property name=\"WaitAnimationOptions\">Panel</property>      <property name=\"ColumnAutoWidth\">true</property>      <property name=\"RowAutoHeight\">true</property>    </property>    <property name=\"OptionsSelection\" isnull=\"true\" iskey=\"true\">      <property name=\"EnableAppearanceFocusedCell\">false</property>    </property>    <property name=\"RowSeparatorHeight\">0</property>    <property name=\"OptionsBehavior\" isnull=\"true\" iskey=\"true\">      <property name=\"Editable\">false</property>      <property name=\"AutoPopulateColumns\">false</property>    </property>    <property name=\"FooterPanelHeight\">-1</property>    <property name=\"HorzScrollVisibility\">Auto</property>    <property name=\"VertScrollVisibility\">Auto</property>    <property name=\"RowHeight\">-1</property>    <property name=\"GroupRowHeight\">-1</property>    <property name=\"OptionsDetail\" isnull=\"true\" iskey=\"true\">      <property name=\"EnableMasterViewMode\">false</property>    </property>    <property name=\"GroupFormat\">{0}: [#image]{1} {2}</property>    <property name=\"VertScrollTipFieldName\" />    <property name=\"GroupSummary\" iskey=\"true\" value=\"0\" />    <property name=\"ActiveFilterString\" />    <property name=\"FormatConditions\" iskey=\"true\" value=\"0\" />    <property name=\"GroupSummarySortInfoState\" />  </XtraSerializer>";
            Update.Table("SavedQuery").Set(new { LayoutXml = layoutXml, ReturnedTypeId = "27628829-20C3-48A2-A488-676C0DF9FDBE", Name = "User Notification List" })
                .Where(new { SavedQueryId = "C03E4108-EB11-49E1-AEDD-5CEA4CEBB022" });

        }
        public override void Down()
        {
            
        }
    }
}
